package cn.ilovese.collect.vo.workermessage;

import cn.ilovese.collect.po.work.Work;
import cn.ilovese.collect.po.workermessage.WorkerMessage;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.NonNull;

import java.util.Date;

public class WorkerMessageVO {
    private Integer id;

    private String scoreContent;

    private Float score;

    public Float getScore() {
        return score;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getScoreContent() {
        return scoreContent;
    }

    public void setScoreContent(String scoreContent) {
        this.scoreContent = scoreContent;
    }

    private Integer reportId;

    private Integer cooReportId;

    private Integer taskId;

    private String taskName;

    private Integer toWorkerId;

    private Integer fromUserId;

    private Integer fromRole;

    private Integer messageType;

    private Integer status;

    private String messageContent;

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public String getMessageContent() {
        return messageContent;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date submitTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getReportId() {
        return reportId;
    }

    public void setReportId(Integer reportId) {
        this.reportId = reportId;
    }

    public Integer getCooReportId() {
        return cooReportId;
    }

    public void setCooReportId(Integer cooReportId) {
        this.cooReportId = cooReportId;
    }

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName == null ? null : taskName.trim();
    }

    public Integer getToWorkerId() {
        return toWorkerId;
    }

    public void setToWorkerId(Integer toWorkerId) {
        this.toWorkerId = toWorkerId;
    }

    public Integer getFromUserId() {
        return fromUserId;
    }

    public void setFromUserId(Integer fromUserId) {
        this.fromUserId = fromUserId;
    }

    public Integer getFromRole() {
        return fromRole;
    }

    public void setFromRole(Integer fromRole) {
        this.fromRole = fromRole;
    }

    public Integer getMessageType() {
        return messageType;
    }

    public void setMessageType(Integer messageType) {
        this.messageType = messageType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public WorkerMessageVO(@NonNull WorkerMessage workerMessage){
        this.cooReportId=workerMessage.getCooReportId();
        this.id=workerMessage.getId();
        this.messageType=workerMessage.getMessageType();
        this.fromRole=workerMessage.getFromRole();
        this.reportId=workerMessage.getReportId();
        this.fromUserId=workerMessage.getFromUserId();
        this.status=workerMessage.getStatus();
        this.toWorkerId=workerMessage.getToWorkerId();
        this.taskName=workerMessage.getTaskName();
        this.taskId=workerMessage.getTaskId();
        this.submitTime=workerMessage.getSubmitTime();
        this.messageContent=workerMessage.getMsgContent();
    }
}